{% extends "./inc/base.html" %} {% block content %}




			<!-- -->
			<section>
				<div class="container">
                 <div class="row bg1x1">
					<!-- LEFT -->
					{% include "./inc/user_left.html" %}
					<!-- RIGHT -->
					<div class="col-lg-10 col-md-10 col-sm-8">

						<ul class="nav nav-tabs nav-bottom-border">
							<li class="active"><a href="#info" data-toggle="tab">个人资料</a></li>
							<li><a href="#avatar" data-toggle="tab">头像</a></li>
							<li><a href="#password" data-toggle="tab">修改密码</a></li>
							{#<li><a href="#privacy" data-toggle="tab">隐私</a></li>#}
						</ul>

						<div class="tab-content ">

							<!-- PERSONAL INFO TAB -->
							<div class="tab-pane fade in active" id="info">
								<form role="form" action="/center/seting/updateinfo" method="post" class="form-horizontal form-info">
									<div class="form-group">
										<label class="col-md-2 control-label">会员账号</label>
										<div class="col-md-10">
											<p class="form-control-static">{{userInfo.username}}</p>
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">会员级别</label>
										<div class="col-md-10">
											<p class="form-control-static">{%set usergroup = userInfo.groupid|get_member_group%}{{usergroup.name}}</p>
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">邮箱</label>
										<div class="col-md-4">
										<input type="email" placeholder="email" class="form-control" name="email" value="{{userInfo.email}}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">真实姓名</label>
										<div class="col-md-4">
										<input type="text" placeholder="真实姓名" class="form-control" name="real_name" value="{{userInfo.real_name}}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">性别</label>
										<div class="col-md-10">

											<label class="radio" style="margin-top: 3px;padding-top: 3px">
												<input type="radio" {%if userInfo.sex == 1 %} checked="checked"{%endif%} value="1" name="sex">
												<i></i> 男
											</label>
											<label class="radio" style="margin-top: 3px;padding-top: 3px">
											<input type="radio" {%if userInfo.sex == 2 %} checked="checked"{%endif%} value="2" name="sex">
											<i></i> 女
										</label>
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">生日</label>
										<div class="col-md-4">
											<input type="text" name="birthday" value="{{userInfo.birthday|dateformat('Y-m-d')}}" class="form-control masked" data-format="9999-99-99" data-placeholder="_" placeholder="年-月-日">
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">手机号码</label>
										<div class="col-md-4">
											<input type="text" name="mobile" value="{{userInfo.mobile}}" class="form-control masked" data-format="99999999999" data-placeholder="X" placeholder="手机号码">
										</div></div>
									<div class="form-group">
										<label class="col-md-2 control-label">所在地区</label>
										<div class="col-md-10">
											<select class="form-control pointer  " id="province1" name="province" style="width: 150px;display: inline-block">
												<option value="">--- 省份/直辖市 ---</option>
												{% for val in province %}
												<option value="{{val.id}}" {% if userInfo.province == val.id %} selected {% endif%}>{{val.name}}</option>
												{% endfor %}
											</select>
											<select class="form-control pointer  " id="city1" name="city" style="width: 150px;display: inline-block">
												{% for val in city %}
												<option value="{{val.id}}" {% if userInfo.city == val.id %} selected {% endif%}>{{val.name}}</option>
												{% else %}
												<option value="">--- 市 ---</option>
												{% endfor %}
											</select>
											<select class="form-control pointer " id="county1" name="county" style="width: 150px;display: inline-block">
												{% for val in county %}
												<option value="{{val.id}}" {% if userInfo.county == val.id %} selected {% endif%}>{{val.name}}</option>
												{% else %}
												<option value="">--- 县/区 ---</option>
												{% endfor %}
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-md-2 control-label">街道地址</label>
										<div class="col-md-10">
										<textarea class="form-control" name="addr"  placeholder="不需要重复填写省市区，必须大于5个字符，小于120个字符">{{userInfo.addr}}</textarea>
										</div>
									</div>

									<div class="form-group margin-top-30">
										<div class="col-md-4 col-md-offset-2">
											<button class="btn btn-primary ajax-post" target-form="form-info" type="submit" ><i class="fa fa-check"></i> 保存更改 </button>
											</div>

									</div>
								</form>
							</div>
							<!-- /PERSONAL INFO TAB -->

							<!-- AVATAR TAB -->
							<div class="tab-pane fade" id="avatar">

								<div class="" id="avatar-modal" aria-labelledby="avatar-modal-label" >
									<div class="">
										<div class="">
											<form class="avatar-form" action="/center/seting/updateavatar" enctype="multipart/form-data" method="post">

												<div class="modal-body">
													<div class="avatar-body">
														<div class="avatar-upload">
															<input class="avatar-src" name="avatar_src" type="hidden">
															<input class="avatar-data" name="avatar_data" type="hidden">

															</div>
														<div class="fancy-file-upload fancy-file-primary">
															<i class="fa fa-upload"></i>
															<input type="file" class="form-control avatar-input" id="avatarInput" name="file" onchange="jQuery(this).next('input').val(this.value);" />
															<input type="text" class="form-control" placeholder="请选择头像图片" readonly="" />
															<span class="button">选择图片</span>
														</div>
														<div class="row">

															<div class="col-md-3">
																<div class="avatar-preview preview-lg"><img src="/u/avatar"  alt="{{controller.user.username}}" /></div>
																<div class="avatar-preview preview-md"><img src="/u/avatar"  alt="{{controller.user.username}}" /></div>
																<div class="avatar-preview preview-sm"><img src="/u/avatar"  alt="{{controller.user.username}}" /></div>
															</div>
															<div class="col-md-9">
																<div class="avatar-wrapper"></div>
															</div>
														</div>
														<div class="row avatar-btns">
															<div class="col-md-3">
																<button class="btn btn-primary btn-block avatar-save" type="submit"><i class="fa fa-save"></i> 保存修改</button>
															</div>
															<div class="col-md-9">
																<div class="btn-group">
																	<button class="btn" data-method="rotate" data-option="-90" type="button" title="Rotate -90 degrees"><i class="fa fa-undo"></i> 向左旋转</button>
																</div>
																<div class="btn-group">
																	<button class="btn" data-method="rotate" data-option="90" type="button" title="Rotate 90 degrees"><i class="fa fa-repeat"></i> 向右旋转</button>
																</div>
															</div>

														</div>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div>

								<div class="loading" aria-label="Loading" role="img" tabindex="-1"></div>
							</div>
							<!-- /AVATAR TAB -->

							<!-- PASSWORD TAB -->
							<div class="tab-pane fade" id="password">

								<form class="form-password form-horizontal" action="/center/seting/updatepassword" method="post">

									<div class="form-group">
										<label class="control-label col-md-2">旧密码</label>
										<div class="col-md-4">
										<input type="password" class="form-control" name="oldpassword" placeholder="输入旧密码">
										</div>
									</div>
									<div class="form-group">
										<label class="control-label col-md-2">新密码</label>
										<div class="col-md-4">
										<input type="password" class="form-control" name="password" placeholder="密码长度6-20个字符">
											</div>
									</div>
									<div class="form-group">
										<label class="control-label col-md-2">确认密码</label>
										<div class="col-md-4">
										<input type="password" class="form-control" name="repassword" placeholder="密码长度6-20个字符">
											</div>
									</div>

									<div class="form-group margin-top-30">
										<div class="col-md-4 col-md-offset-2">
											<button class="btn btn-primary ajax-post" target-form="form-password" type="submit" ><i class="fa fa-check"></i> 确认修改 </button>
										</div>

									</div>
								</form>

							</div>
							<!-- /PASSWORD TAB -->
{#
							<!-- PRIVACY TAB -->
							<div class="tab-pane fade" id="privacy">

								<form action="#" method="post">
									<div class="sky-form">

										<table class="table table-bordered table-striped">
											<tbody>
												<tr>
													<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.</td>
													<td>
														<div class="inline-group">
															<label class="radio nomargin-top nomargin-bottom">
																<input type="radio" name="radioOption" checked=""><i></i> Yes
															</label>

															<label class="radio nomargin-top nomargin-bottom">
																<input type="radio" name="radioOption" checked=""><i></i> No
															</label>
														</div>
													</td>
												</tr>
												<tr>
													<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.</td>
													<td>
														<label class="checkbox nomargin">
															<input type="checkbox" name="checkbox" checked=""><i></i> Yes
														</label>
													</td>
												</tr>
												<tr>
													<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.</td>
													<td>
														<label class="checkbox nomargin">
															<input type="checkbox" name="checkbox" checked=""><i></i> Yes
														</label>
													</td>
												</tr>
												<tr>
													<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam.</td>
													<td>
														<label class="checkbox nomargin">
															<input type="checkbox" name="checkbox" checked=""><i></i> Yes
														</label>
													</td>
												</tr>
											</tbody>
										</table>

									</div>

									<div class="margin-top-10">
										<a href="#" class="btn btn-primary"><i class="fa fa-check"></i> Save Changes </a>
										<a href="#" class="btn btn-default">Cancel </a>
									</div>

								</form>

							</div>
							<!-- /PRIVACY TAB -->
#}
						</div>

					</div>
				 </div>
					
					
				</div>
			</section>
			<!-- / -->
{% endblock %}
{%block style%}
<link href="/static/assets/plugins/jquery-html5-upload/cropper/cropper.min.css" rel="stylesheet">
<link href="/static/assets/plugins/jquery-html5-upload/sitelogo/sitelogo.css" rel="stylesheet">
{%endblock%}
{% block script %}
<script type="text/javascript" src="/static/assets/js/view/demo.shop.js"></script>
<script src="/static/assets/plugins/jquery-html5-upload/cropper/cropper.min.js"></script>
<script src="/static/assets/plugins/jquery-html5-upload/sitelogo/sitelogo.js"></script>

{% endblock %}